<template>
  <div>
    <div class="d1">
      <p>父组件展示-----身高：{{state.high}}-----年龄：{{state.age}}</p>
      <button @click="add">添加</button>
    </div>
    <div class="d1">
      <Index v-model="state.high" v-model:age="state.age"></Index>
    </div>
  </div>
</template>

<script setup>
import { reactive, ref, toRefs } from 'vue';
import Index from "../../components/sanDianEr/组件通信v-model/index.vue"
let state = reactive({
  high: 1,
  age: 1,
})
let add = () => {
  state.high++
  state.age++
}

</script>
<style scoped lang ='less'>
.d1 {
  height: 200px;
  width: 80%;
  margin: 10px auto;
  border: 1px solid #000;
  text-align: center;
}
</style>